***** In this do-file, we appended the BES-waves to get a complete data set consisting of 19 waves (waves 1-19) **********************
***** Data for every wave should be downloaded from the British Election Study website and name "BES2019_W1", "BES2019_W2", etc. *****

* Open Wave 19 data set
use "...\BES2019_W19.dta"

* Appending 
append using "...\BES2019_W18.dta", keep(age education edlevel gender generalElectionVote handleEUNegotiate id leftRight trustMPs wave euRefVote partyId) 

append using "...BES2019_W17.dta", keep(age approveUKGovt education edlevel gender generalElectionVote handleEUNegotiate id leftRight partyId satDemEng satDemScot satDemUK satDemWales trustMPs wave euRefVote)

append using "...\BES2019_W16.dta", keep(age approveUKGovt education edlevel gender generalElectionVote handleEUNegotiate id leftRight partyId satDemEng satDemScot satDemUK satDemWales trustMPs turnoutUKGeneral wave euRefVote)

append using "...\BES2019_W15.dta", keep(age approveUKGovt education edlevel gender generalElectionVote handleEUNegotiate id leftRight  satDemEng satDemScot satDemUK satDemWales trustMPs turnoutUKGeneral wave euRefVote partyId)

append using "...\BES2017_W14.dta", keep(age approveUKGovt approveWelshGovt education edlevel gender generalElectionVote handleEUNegotiate id leftRight partyId turnoutUKGeneral wave euRefVote) 

append using "...\BES2017_W13.dta", keep(age education edlevel gender generalElectionVote handleEUNegotiate id leftRight partyId satDemEng satDemScot satDemUK satDemWales wave euRefVote)

append using "...\BES2017_W12.dta", keep(age ageGroup education edlevel gender generalElectionVote handleEUNegotiate id leftRight partyId trustMPs turnoutUKGeneral wave euRefVote partyId)

append using "...\BES2015_W11.dta", keep(age approveUKGovt education edlevel gender generalElectionVote handleEUNegotiate id leftRight partyId satDemEng satDemScot satDemUK satDemWales turnoutUKGeneral wave euRefVote)

append using "...\BES2015_W10.dta", keep(approveUKGovt educationW8W9 edlevel gender generalElectionVote handleEUNegotiate id leftRight partyId satDemEng satDemEU satDemScot satDemUK satDemWales trustMPs turnoutUKGeneral wave euRefVote)

append using "...\BES2015_W9.dta", keep(age approveUKGovt education edlevel id leftRight partyId satDemEng satDemEU satDemScot satDemUK satDemWales trustMPs turnoutUKGeneral wave euRefVote)

append using "...\BES2015_W8.dta", keep(age education edlevel euRefVote gender generalElectionVote id leftRight partyId satDemEng satDemEU satDemScot satDemUK satDemWales trustMPs turnoutUKGeneral wave partyId)

append using "...\BES2015_W7.dta", keep(age approveUKGovt approveWelshGovt education edlevel gender generalElectionVote id leftRight partyId satDemEng satDemEU satDemScot satDemUK satDemWales trustMPs turnoutUKGeneral wave euRefVote)

append using "...\BES2015_W6.dta", keep(age education edlevel gender generalElectionVote id leftRight partyId satDemEng satDemEU satDemScot satDemUK satDemWales trustMPs wave euRefVote)

append using "...\BES2015_W5.dta", keep(age edlevel endtime gender generalElectionVote id leftRight turnoutUKGeneral wave)

append using "...\BES2015_W4.dta", keep(age approveUKGovt education edlevel gender generalElectionVote id leftRight partyId satDemEng satDemEU satDemScot satDemUK satDemWales trustMPs turnoutUKGeneral wave euRefVote)

append using "...\BES2015_W3.dta", keep(age approveUKGovt education edlevel generalElectionVote id leftRight partyId satDemEng satDemEU satDemScot satDemUK satDemWales trustMPs turnoutUKGeneral wave euRefVote) 

append using "...\BES2015_W2.dta", keep(age approveUKGovt education edlevel gender generalElectionVote id leftRight partyId  satDemEng satDemEU satDemScot satDemUK satDemWales trustMPs turnoutUKGeneral wave euRefVote)

append using "...\BES2015_W1.dta", keep(age approveUKGovt edlevel gender generalElectionVote id leftRight partyId satDemEng satDemEU satDemScot satDemUK satDemWales trustMPs turnoutUKGeneral wave euRefVote)

*** Save the appended data set as "fulldata"
save "...\fulldata.dta"
